import type { BindListReq } from './model/bindModel';

import { type BaseListReq } from '#/api/model/baseModel';
import { requestClient } from '#/api/request';

enum AgentConversation {
  GetConversationHistory = '/cs-api/conv_records',
  GetConversationWebhook = '/cs-api/webhook',
  GetCustomerStar = '/cs-api/customer_star',
  Translate = '/cs-api/translator',
}

/**
 * @description: Get conversation history
 */

export const getConversationHistory = (params: BaseListReq) => {
  return requestClient.get(AgentConversation.GetConversationHistory, {
    params,
  });
};

/**
 *@description: Get conversation Webhook
 */
export const getConversationWebhook = (params: BindListReq) => {
  return requestClient.get(AgentConversation.GetConversationWebhook, {
    params,
  });
};

/**
 * @description: update customer star
 */
export const updateCustomerStar = (data: any) => {
  return requestClient.put(AgentConversation.GetCustomerStar, data);
};
/**
 * @description: translate conversation
 */
export const translateLanguage = (data: any) => {
  return requestClient.post(AgentConversation.Translate, data);
};
